const t = translate("公共模块");

export const getBindMode = (flag: string) => {
  return flag === "0" ? "自动" : "手动";
};

export const isOnline = (flag: number) => {
  return ["在线", "离线"][flag];
};

export const getQueueStatus = (status: number) => {
  const statusList = [
    {
      text: "准备就绪",
      color: "gray"
    },
    {
      text: "待更新",
      color: "gray"
    },
    {
      text: "更新中",
      color: "gray"
    },
    {
      text: "已更新",
      color: "green"
    },
    {
      text: "任务超时",
      color: "#c1121f"
    },
    {
      text: "已被删除",
      color: "red"
    }
  ];
  return statusList[status];
};

export const errOptions: string[] = [
  "价签不在线",
  "无法发送主题",
  "网关未响应",
  "缓存已过期",
  "未绑定基站"
];
